import request from '@/api/request/index'
import type {
  DeliveryAskDetailDto,
  PageDataDeliveryAskInfoDto,
  FenYeJiChu,
  ReplyDeliveryAskDto,
  BaseFileDto
} from './_interfaces.ts'

/** 货期咨询详情查询 */
export function deliveryAskQueryDeliveryAskDetail(data: { id?: string }): Promise<DeliveryAskDetailDto> {
  return request.get('/api/deliveryAsk/queryDeliveryAskDetail', data)
}

/** 开发-查询货期咨询列表 */
export function deliveryAskQueryDeliveryAskList(data: FenYeJiChu): Promise<PageDataDeliveryAskInfoDto> {
  return request.post('/api/deliveryAsk/queryDeliveryAskList', data)
}

/** 回复货期咨询 */
export function deliveryAskReplyDeliveryAsk(data: ReplyDeliveryAskDto): Promise<any> {
  return request.post('/api/deliveryAsk/replyDeliveryAsk', data)
}

/** 上传货期咨询图片 */
export function deliveryAskUploadDeliveryAskImage(data?: any): Promise<BaseFileDto> {
  return request.post('/api/deliveryAsk/uploadDeliveryAskImage', data)
}
